package com.firefightingiot.firefightingiot.web.web;

import cn.hutool.json.JSONObject;
import com.firefightingiot.firefightingiot.common.base.BaseController;
import com.firefightingiot.firefightingiot.support.annotaion.Action;
import com.firefightingiot.firefightingiot.support.annotaion.At;
import com.firefightingiot.firefightingiot.support.model.RespEntity;
import com.firefightingiot.firefightingiot.web.service.ReportService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;

/**
 * 消防物联网报警控制器
 */
@Action
@RequestMapping(value="report")
public class ReportController extends BaseController {
    @Resource
    public ReportService reportService;

    /**
     * @return
     * @Title: getReport <br>
     * @Description: (下载报告) <br>
     * @author 石延杰<br>
     */
    @At(value = "getReport",method = RequestMethod.GET)
    public RespEntity getReport(@RequestBody(required = false) JSONObject jsonParam) throws Exception {
        return reportService.getReport(jsonParam);
    }
}